Delete User
Description
Delete a specific user by ID (soft delete).
Authentication
- Required: Yes
- Roles: Any authenticated user
Request
Headers
DELETE /v1/customer/user/:id
Authorization: Bearer <token>
Content-Type: application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | number | Yes | User ID |
Response
Success Response (200)
{
"data": {
"message": "User deleted successfully"
}
}
message:
- Type: string
- Description: Confirmation message
Error Responses
- 401: Authentication required
- 404: User not found
- 422: Validation errors (see Error Response Format)
Error Codes
- E010_BAD_RESOURCE_NOT_EXISTS: User not found
Example Usage
curl -X DELETE https://api.stepx.io.vn/v1/customer/user/1 \
-H "Authorization: Bearer <token>"
const response = await fetch('https://api.stepx.io.vn/v1/customer/user/1', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();